package com.yihong.portalserver.feign;

import com.yihong.common.entity.User;
import com.yihong.common.util.AjaxJson;
import com.yihong.portalserver.feignfallback.UserFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @ClassName UserFeign
 * @Description
 * @Author 孟志浩
 * @Date 2019/3/18 15:29
 **/
@FeignClient(name = "userserver",fallback = UserFallBack.class)
public interface UserFeign {

    @GetMapping("/user/list")
    List<User> listUsers();

    @PostMapping("/user/login")
    AjaxJson login(User user);

}
